<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CraeteUserSpiderInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('user_spider_infos', function (Blueprint $table) {
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
            $table->comment = '用户爬虫数据';
            $table->increments('id');
            $table->integer('loan_request_id')->comment('申请授信ID @user_loan_requests.id');
            $table->integer('user_id')->comment('用户id @users.id');
            $table->string('trade_no')->comment('爬虫流水号');
            $table->string('type')->comment('爬虫类型 @user_auth_spider_trans_logs.type');
            $table->string('source')->default('')->comment('渠道来源');
            $table->longText('result')->comment('爬虫结果');
            $table->timestamps();
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('user_spider_infos');
    }
}
